<template>
  <div>
    <div class="header">
      <h1>小黑记事本</h1>
      <input type="text" v-model="content" />
      <button @click="add">添加</button>
    </div>
  </div>
</template>
<script>
export default {
  data() {
    return {
      content: ""
    };
  },
  created() {},
  computed: {},
  methods: {
    add(){
      this.$emit("add",this.content);
      this.content = "";
    }
  },
};
</script>
<style lang='less'  scoped>

</style>
